Transfer learning based capsule endoscopic images classification system and method thereof

ABSTRACT

The present invention provides a transfer learning based capsule endoscopic images classification system. The system removes the capsule endoscopic images with an average brightness value beyond the preset threshold, and removes the capsule endoscopic images without details based on image brightness standard deviation and image brightness gradient. The system also removes similar images from the capsule endoscopic images using optical flow method, classifies the capsule endoscopic images according to the corresponding anatomical structure, and obtains the classified capsule endoscopic images list arranged in chronological order. The system further determines and labels the position of the first image of each specific anatomical structure in the classified capsule endoscopic images list arranged in chronological order.

CROSS-REFERENCE OF RELATED APPLICATIONS

The application claims priority to Chinese Patent Application No.201910165108.9 filed on Mar. 5, 2019, the contents of which areincorporated by reference herein.

FIELD OF INVENTION

The present invention relates to image processing technology, and moreparticularly to a transfer learning based capsule endoscopic imagesclassification system and method thereof.

BACKGROUND

Existing capsule endoscope can take a large number of images (about50,000 images) in a single examination, but among them, there are onlysmall proportion of images of specific anatomical structure (such ascardia, pylorus, duodenum, etc.). It is quite difficult to pick out therequired images from a large amount of data, which makes physicians'work more demanding. Therefore, there is a need for a method capable ofremoving redundant images and classifying the images according tospecific anatomical structure of digestive tract, and therebyfacilitating the work of physicians and improving their work efficiency.

SUMMARY OF THE INVENTION

The present invention provides a transfer learning based capsuleendoscopic images classification system and a method thereof. Theinvention can quickly remove redundant images and eliminate the imageswithout details to reduce the number of images that a physician needs toreview and reduce the workload of the physician, and can quickly locatethe images to various regions of digestive tract, improving workefficiency of the physician.

A system for transfer learning based capsule endoscopic imagesclassification disclosed herein comprises an image preprocessing module,a similar image removal module, an image classification module, and akey image positioning module.

The image preprocessing module removes the capsule endoscopic imageswith an average brightness value beyond a preset threshold, and removesthe capsule endoscopic images without details by using an imagebrightness standard deviation and an image brightness gradient.

The similar image removal module removes similar images from the capsuleendoscopic images using optical flow method.

The image classification module classifies the capsule endoscopic imagesaccording to corresponding anatomical structure to obtain the classifiedcapsule endoscopic images list arranged in chronological order.

The key image positioning module determines and labels the position ofthe first image of each specific anatomical structure in the classifiedcapsule endoscopic images list arranged in chronological order.

Further, the image preprocessing module calculates an average brightnessvalue M in the effective area of a capsule endoscopic image. When theaverage brightness value M is less than the too dark threshold Low, theimage preprocessing module determines the corresponding capsuleendoscopic image as too dark and removes the image. When the averagebrightness value M is greater than the too bright threshold High, theimage preprocessing module determines the corresponding capsuleendoscopic image as too bright and removes the image.

Further, the image preprocessing module calculates an image brightnessstandard deviation S and an image brightness gradient G in the effectivearea of a capsule endoscopic image, and counts the number of pixels B asthe image brightness gradient G meets requirements. When the imagebrightness standard deviation S is less than the image brightnessstandard deviation threshold StdStd or the number of pixels B is lessthan the threshold for an effective gradient GradNum, the imagepreprocessing module determines that the corresponding capsuleendoscopic image has no details and removes it.

Further, the similar image removal module removes similar images fromthe capsule endoscopic images using optical flow method, comprising:

setting K feature points in the effective area of the current capsuleendoscopic image;

adjusting the brightness of next capsule endoscopic image, until theaverage brightness value of the next capsule endoscopic image as thesame as the average brightness value of the current capsule endoscopicimage;

in the effective area of the said next capsule endoscope image, settingthe positions of feature points of the current capsule endoscopic imageas initial positions, and searching for the best matching position ofeach feature point in the current capsule endoscopic image around theinitial positions using optical flow method;

assigning a weight to the best matching position of each feature point,calculating the sum of weights of the best matching positions of allfeature points as the image matching weight W, and removing similarimages using the image matching weight W.

Further, the image classification module comprises a preset image datamodel module, a transfer learning model module and a manual featureextraction module.

The capsule endoscopic images processed by the image preprocessingmodule and the similar image removal module are processed by the presetimage data model module to obtain a first image data feature. The firstimage data feature is processed by the transfer learning model module toobtain a second image data feature, and at the same time processed bythe manual feature extraction module to obtain a third image datafeature. The second image data feature and the third image data featureare fused to obtain an image classification data feature. According tospecific anatomical structure, the capsule endoscopic images areclassified by the image classification data feature.

Further, the key image positioning module removes interference data fromthe classified capsule endoscopic images arranged in chronological orderby filtering, and then searches for the position of the first image ofeach anatomical structure in filtered capsule endoscopic images list.

A method for transfer learning based capsule endoscopic imagesclassification, comprising:

removing the capsule endoscopic images with an average brightness valuebeyond the preset threshold, and removing the capsule endoscopic imageswithout details based on the image brightness standard deviation andimage brightness gradient;

removing similar images from the capsule endoscopic images using opticalflow method;

classifying the capsule endoscopic images according to the correspondinganatomical structure to obtain the classified capsule endoscopic imageslist arranged in chronological order;

determining and labeling the position of the first image of eachspecific anatomical structure in the classified capsule endoscopicimages list arranged in chronological order.

The present invention has the following beneficial effects.

The present invention removes too bright and too dark images accordingto the comparison of average brightness values and preset imagebrightness threshold, and removes images without details (the capsuleendoscopic images of specific anatomical structures are rich in details)using image brightness standard deviation and image brightness gradient,which greatly reduces the number of images that need to be classifiedand improves classification efficiency.

The present invention realizes perfect removal of similar images usingoptical flow method, which reduces the number of images that need to beclassified and improves classification efficiency.

The present invention greatly improves the image classification effectby combining artificial features and the features obtained by deeplearning.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a structural view of the capsule endoscopic imagesclassification system of the present invention.

FIG. 2 is a structural view of an effective area of an image accordingto the present invention.

FIG. 3 is a flowchart determining similar images using an optical flowmethod according to the present invention.

FIG. 4 is a schematic view of feature points matching using an opticalflow method according to the present invention.

FIG. 5 is a flowchart of transfer learning according to the presentinvention.

Elements in the figures are: 1. Image preprocessing module 1, 2. Similarimage removal module 2, 3. Image classification module 3, 4. Key imagepositioning module 4.

DETAILED DESCRIPTION

The present invention is described in detail below with reference to theaccompanying drawings and preferred embodiments.

The present invention provides a transfer learning based capsuleendoscopic images classification system. As shown in FIG. 1, the capsuleendoscopic images classification system comprises an image preprocessingmodule 1, a similar image removal module 2, an image classificationmodule 3, and a key image positioning module 4. The image preprocessingmodule 1 compares the average brightness value with preset imagebrightness threshold in the effective area of each capsule endoscopicimage, and removes excessively bright and dark images with the averagebrightness value beyond the preset image brightness threshold. The imagepreprocessing module 1 further calculates an image brightness standarddeviation and an image brightness gradient in the effective area of eachcapsule endoscopic image, and removes the images without details (thecapsule endoscopic images of specific anatomical structures are rich indetails) using the image brightness standard deviation and imagebrightness gradient. The similar image removal module 2 i removessimilar images from the pre-processed capsule endoscopic images usingoptical flow method which can overcome the adverse effects caused byimage rotation, and adjusts image brightness to overcome the adverseeffects caused by light. The image classification module 3 classifiesthe capsule endoscopic images processed by the image preprocessingmodule 1 and the similar image removal module 2 according to thecorresponding anatomical structure, and obtains the classified capsuleendoscopic images list arranged in chronological order. The key imagepositioning module 4 determines and labels the position of the firstimage of each specific anatomical structure in the classified capsuleendoscopic images list arranged in chronological order.

The effective area refers to an area at the center of the image. Theshape of the effective area can be adjusted according to the image takenby the capsule endoscope, and the shape can be rectangular, circular,elliptical, or polygonal, etc. The size of the effective area can beadjusted according to the image taken by the capsule endoscope. When thearea size exceeds the image size, the original image is used. Generally,the size of the effective area is (α×Width)×(α×Height), where,respectively, Width and Height are the width and height of image, and αis the area size coefficient, of which the value range is: α=[0.2,1]. Inthe preferred embodiment, the shape of the effective area isrectangular, α=0.7, as shown in FIG. 2.

Due to the complex environment of digestive tract, especially in thestomach which has a large cavity, during capsule endoscopy, a pluralityof too bright and too dark images can be obtained, and at the same time,a plurality of smooth gastric wall images can be obtained. The smoothgastric wall images include no useful information, but greatly increasethe number of images and affect the processing of capsule endoscopicimages. The image preprocessing module 1 pre-processes the digestivetract images taken by the capsule endoscope, removes too bright and darkimages, and removes the images without details. Specifically, the imagepreprocessing module 1 calculates an average brightness value in theeffective area of each capsule endoscopic image, and remove too brightand too dark images using a preset image brightness threshold.

Specifically, the average brightness value M is calculated by thefollowing formula:

${M = \frac{\sum_{i}^{N}I_{i}}{N}}.$

Wherein, N is the number of image pixels in the effective area, I_(i) isthe gray value of the i-th pixel in the effective area.

When M<Low, the image preprocessing module determines that thebrightness of the corresponding capsule endoscopic image is too dark,and removes it. When M>High, the image preprocessing module determinesthat the brightness of the corresponding capsule endoscopic image is toobright, and removes it.

Wherein, Low is the image too dark threshold, High is the image toobright threshold, which are both obtained through calculation of thebrightness of actual images. Generally, the value range of the image toodark threshold Low is: Low=[30,80], and the value range of the image toobright threshold High is: High=[180,240]. In the preferred embodiment,Low=50, High=220.

The image preprocessing module 1 further calculates an image brightnessstandard deviation and an image brightness gradient within the effectivearea of each capsule endoscopic image, and removes the images withoutdetails according to the image brightness standard deviation and imagebrightness gradient.

Specifically, the image brightness standard deviation S is calculated bythe following formula:

${S = \sqrt[2]{\frac{\sum_{i}^{N}\left( {I_{i} - M} \right)^{2}}{N}}}.$

Wherein, N is the number of image pixels in the effective area, I_(i) isthe gray value of the i-th pixel in the effective area, M is the averagebrightness value.

The specific method that the image preprocessing module 1 uses to removethe images without details, comprises following steps.

First, sobel operator is used to obtain the brightness gradients f_(x)and f_(y) in the horizontal and vertical directions. The brightnessgradient is G=f_(x) ²+f_(y) ².

Then, the number of pixels B as the image brightness gradient G meetsrequirements is counted by the following formulas:

${B = {\sum_{i}^{N}{S{g\left( G_{i} \right)}}}},\mspace{14mu}{{{Sg}\left( G_{i} \right)} = \left\{ {\begin{matrix}{1,} & {G_{i} \geq {Grad}} \\{0,} & {else}\end{matrix}.} \right.}$

When S<Std or B<GradNum, the image preprocessing module determines thatthe corresponding capsule endoscopic image has no details and removesit.

Wherein, G_(i) is the gradient of the i-th pixel in the effective area,S is the brightness standard deviation in the effective area of thecapsule endoscopic image, N is the number of image pixels in theeffective area, Grad is the threshold for determining if the imagegradient is effective, Std is the image brightness standard deviationthreshold, and GradNum is the threshold for the number of effectivegradients.

When the gradient G_(i) of the i-th pixel in the effective area exceedsGrad, it is considered to be an effective brightness gradient.Generally, the value range of Grad is: Grad=[10,5000]. In the preferredembodiment, Grad=1100.

In addition, generally, the value range of Std is: Std=[0, 100], and thevalue range of GradNum is: GradNum=[10,1000]. In the preferredembodiment, Std=20, GradNum=300.

For a specific anatomical structure, the capsule endoscope cancontinuously take a plurality of images, resulting in image redundancyand affecting the image review efficiency of physicians. The similarimage removal module 2 can remove these redundant images, and therebyimprove the work efficiency of physicians. An optical flow method isused to remove similar images. The optical flow method can overcome theadverse effects caused by image rotation, and adjust the imagebrightness to overcome the adverse effects caused by light, which has agood effect.

Referring to FIG. 3, a flowchart determining similar images using anoptical flow method, the specific steps are as follows.

Step S21, K feature points are set in the effective area of the currentcapsule endoscopic image.

Step S22, the brightness of next capsule endoscopic image is adjusted,and the average brightness value of next capsule endoscopic image isadjust as the same as the average brightness value of the currentcapsule endoscopic image, so as to reduce the influence of light. Thespecific image brightness adjustment method is:I_(next)=I_(next)−M_(next)+M_(current) wherein, I_(next) is the grayvalue of all pixels of the next image, M_(next) is the averagebrightness value of the next image, and M_(current) is the averagebrightness value of the current image.

Step S23, in the effective area of the said next capsule endoscopicimage, the positions of feature points of the current capsule endoscopicimage are set as initial positions, and search for the best matchingposition of each feature point in the current capsule endoscopic imagearound the initial positions using the optical flow method.

Step S24, a weight is assigned to the best matching position of eachfeature point, the sum of weights of the best matching positions of allfeature points is calculated as the image matching weight, and similarimages are removed using the image matching weight.

Due to the characteristics of capsule endoscopic images, few featurepoints can be obtained using sift method. In order to overcome thisshortcoming, the step S21 can uniformly set K feature points in theeffective area of the current capsule endoscopic image, as shown in FIG.4. Generally, K=[9, 2500]. In the preferred embodiment, K=100.

Further, in order to eliminate the influence of flat area on the imagematching weight, the weights of feature points at the image details isadjusted. In the step S24, the specific method for determining similarimages by using the image matching weight comprises following steps.

First, the image matching weight W is calculated by the followingformula:

${W = {\sum_{i}^{P}{S{g\left( S_{i} \right)}}}},\mspace{14mu}{{{Sg}\left( S_{i} \right)} = \left\{ {\begin{matrix}{u,} & {S_{i} > {Astd}} \\{v,} & {else}\end{matrix}.} \right.}$

Wherein, P is the number of matched feature points, S_(i) is the imagebrightness standard deviation in the neighborhood (Asize×Asize) of thei-th feature point of the current image (for calculation method, referto that of the image brightness standard deviation S in the imagepreprocessing module 1), AStd is a threshold for determining theexistence of details in the neighborhood (Asize×Asize), and Asize is thesize of neighborhood. Generally, Asize=[3,21], AStd=[1,10]. In thepreferred embodiment, Asize=9, AStd=5.

Then, whether they are details in the neighborhood of image featurepoint is determined. When S_(i)>AStd, it is determined that theneighborhood of the i-th feature point has details, the matching weightof the i-th feature point is u; otherwise, the matching weight of thei-th feature point is v. Generally, u=[2,20], v=[0,2]. In the preferredembodiment, u=10, v=1.

Finally, whether the images are similar is determined. When the imagematching weight W<Wth or P<Pth, it is determined that the correspondingcapsule endoscopic images are not similar. Otherwise, it is determinedthat the corresponding capsule endoscopic images are similar. Wherein,Pth is the threshold of the number of matched feature points, Wth is theimage matching weight threshold. Generally, Wth=[0,K×u], Pth=[0,K]. Inthe preferred embodiment, the image matching weight threshold Wth=70,and the threshold of the number of matched feature points Pth=30.

It can be seen that the more details the neighborhood of an imagefeature point has, the higher the matching weight of the feature pointsis; otherwise, the matching weight is lower. The higher the imagematching weight W, the more similar the corresponding capsule endoscopicimages; otherwise, they are less similar. The larger the number ofmatched feature points P, the more similar the corresponding capsuleendoscopic images; otherwise, they are less similar.

Referring to FIG. 5, a flowchart of digestive tract imagesclassification performed by the image classification module 3 usingtransfer learning. The image classification module 3 comprises a presetimage data model module, a transfer learning model module, and a manualfeature extraction module. The specific steps of the imageclassification module 3 in classifying the capsule endoscopic imagesprocessed by the image preprocessing module 1 and the similar imageremoval module 2 are as follows.

Step S31, first image data features are extracted from the preset imagedata model module.

Step S32, features are extracted using the transfer learning modelmodule from the first image data features to obtain second image datafeatures.

Step S33, third image data features are manually extracted from thecapsule endoscopic images using the manual feature extraction module.The third image data features include features such as image color,texture, and gradient.

Step S34, the second image data features and the third image datafeatures are fused to obtain image classification data features, and theimage data classification features are classified according to specificanatomical structure.

The steps S31, S32 and S33 are performed simultaneously.

The preset image data model can be a model that has been trained inother fields, such as a model that works well in the natural imagefield, a model that is well classified in other medical image fields,etc. In the preferred embodiment, the preset image data model is themodel inception-v3 that works well on natural images.

In the step S31, the parameters of the first image data feature can becompletely trained for adjustment, partially trained for adjustment, ornot adjusted. In the preferred embodiment, the parameters of the firstimage data feature are not adjusted.

In the step S32, the second image data feature can be adjusted accordingto the situations, by adjusting model convolution sum and parameters,increasing or reducing convolution layers, while adjusting the fullyconnected layers. In the preferred embodiment, the second image datafeature comes with an increase of one convolution layer and anadjustment of fully connected parameters.

In the step S33, the color, texture and gradient features of the capsuleendoscopic images are extracted manually, and the color feature isobtained by calculating the Hu matrix of each channel of HSV.

The texture feature is a CLBP (Completed Local Binary Pattern)histogram, which includes symbol CLBP_S and margin CLBP_M. The specificcalculation method is:

${{CLBP\_ S}_{L,R} = {\sum\limits_{l = 0}^{L - 1}{{s\left( {g_{l} - g_{c}} \right)}2^{l}}}},\mspace{14mu}{{s(x)} = \left\{ {{{\begin{matrix}{1,} & {x \geq 0} \\{0,} & {x < 0}\end{matrix}{CLBP\_ M}_{L,R}} = {\sum\limits_{l = 0}^{L - 1}{{t\left( {V_{l},\ c} \right)}2^{l}}}},\mspace{14mu}{{t\left( {x,\ c} \right)} = \left\{ \begin{matrix}{1,} & {x \geq c} \\{0,} & {x < c}\end{matrix} \right.}} \right.}$

Wherein, 2^(l) represents the weight of current pixel, s is a compareoperation, s(x) determines whether the gray difference x>0, t(x, c)determines whether the gray difference x>threshold c, L is the number ofpixels to be used in the neighborhood where the current pixel radius isR, g_(c) is the value of G (green) channel minus B (blue) channel of thecurrent pixel to be processed, g_(l) is the value of G channel minus Bchannel of the pixels around the current pixel, the position of g_(l) is(R cos(2 πl/L), R sin(2πl/L)), V_(l)=|g_(l)−g_(c)| is the absolute valueof the difference between the current pixel and the neighboring pixel,the threshold c is an average value in the effective area V_(l).

In the step S34, the fusion of image data features, such as fusing thesecond image data feature 20 dimensions and the third image data feature30 dimensions (color features 10 dimensions, texture feature dimensions,gradient feature 5 dimensions), obtains image classification datafeatures 50 dimensions. In the preferred embodiment, the digestive tractimages are classified into esophagus, gastric wall folds, cardia,pylorus, fundus, antrum, angulus, duodenum, jejunum, ileum, cecum, colonand rectum based on the obtained image classification data features.

The key image positioning module 4 processes the classified capsuleendoscopic images list, and filters interference in the classified imagelist. During filtering, it is necessary to continuously adjust thefilter parameters until the interference is completely filtered. Then,the key image positioning module 4 searches for the position of thefirst image of each specific anatomical structure in filtered capsuleendoscopic image list.

The key image positioning module 4 processes the classified capsuleendoscopic images list to obtain the position of the first image of eachspecific anatomical structure, so that the physicians can quickly reviewthe images. When searching for key images, the key image positioningmodule 4 classifies the stomach images (gastric wall folds, cardia,pylorus, gastric fundus, antrum and angulus) into one category. Thedigestive tract images include more stomach images and intestine images(duodenum, jejunum, ileum, cecum, colon, rectum) but less esophagusimages. Different methods are needed to locate the first stomach imageand the first intestine image. The specific method to locate the firstintestine image is as follows.

Step S41, the position Pos_(f) of the first intestine image and theposition Pos_(l) of the last intestine image are found in the classifiedList and, and whether there are other images between Pos_(f) and Pos_(l)is confirmed. If there are other images between Pos_(f) and Pos_(l),filtering is needed, until there are no other images between Pos_(f) andPos_(l), and Pos_(f) is the position of the first intestine image.

In the step S41, any filtering method can be used. In the preferredembodiment, the median filtering is used.

During filtering, it is needed to continuously adjust the filterparameters. The specific adjustment method is: set an initial width offilter window, of which, the value range is Win=[3,101], and after eachfiltering, increase the width of filter window usingWin_(i)=Win_(i−1)+dWin, wherein, Win_(i) represents the width of filterwindow in the i-th filtering, Win_(i−1) represents the width of filterwindow in the i−1-th filtering, that is the width of filter window inprevious filtering; dWin is the increased value of the filter windowwidth after each filtering, of which, the value range is dWin=[2,500].In the preferred embodiment, Win=51, dWin=50.

The methods of searching for the key positions of intestine images(duodenum, jejunum, ileum, cecum, colon, rectum) are the same, and theanatomical structures in the intestine images appear in the sequence ofduodenum, jejunum, ileum, cecum, colon and rectum, so during processing,the length of the images list to be processed can be continuouslyadjusted to reduce list interference. The specific method is:Local_(i+1)=find(List(Local_(i) :T−1)).

Wherein, T is the total length of the classified list,List(Local_(i):T−1) is a partial list of the List cut from the positionLocal_(i) to the position T−1, find( ) represents the process of findingthe position where the first key image appears in the step S41,Local₀=0, Local₁, Local₂, Local₃, Local₄, Local₅ and Local₆ respectivelyrepresent the positions where the first images of duodenum, jejunum,ileum, cecum, colon and rectum appear.

For the position where the first stomach image appears, a differentmethod from that of finding the position where the first intestine imageappears is needed, that is, the filter parameters need to be adjusted.The number of esophagus images is less compared to the stomach andintestine images, so it is necessary to reduce the filter window widthto prevent the esophagus image from being filtered in the filteringprocess. The specific method to locate the first stomach image is asfollows.

Step S42, the previous classification list List(0: Local₁) of intestineimages is cut to filter. During filtering, the initial window parameterWin′ of filter and the increased value dWin′ of the filter window widthneed to be adjusted. After num filtering, the position of the firststomach image is the key position of the stomach image to be searched.

For the key image position of stomach, the filter window width cannot betoo large. Generally, Win′=[3,15], dWin′=[2,10]. In the preferredembodiment, the initial width is Win′=9, the increased value of thefilter window width is dWin′=3, and num filtering is performed. Thevalue range of num is [1,5]. In the preferred embodiment, num=3.

The present invention further provides a transfer learning based capsuleendoscopic images classification method, comprising the following steps.

Step 1: the image preprocessing module 1 removes the capsule endoscopicimages with the average brightness value beyond the preset threshold,and remove the capsule endoscopic images without details based on imagebrightness standard deviation and image brightness gradient.

Step 2: the similar image removal module 2 removes similar images fromthe pre-processed capsule endoscopic images using optical flow method.

Step 3: the image classification module 3 classifies the processedcapsule endoscopic images through the step 1 and step 2 according to thecorresponding anatomical structure, and obtains the classified capsuleendoscopic images list arranged in chronological order.

Step 4: the key image positioning module 4 determines and labels theposition of the first image of each specific anatomical structure in theclassified capsule endoscopic images list arranged in chronologicalorder.

In the transfer learning based capsule endoscopic images classificationsystem disclosed herein, all of other specific methods can be used forcapsule endoscopic images classification method, which cannot berepeated here.

Although certain disclosed embodiments of the present disclosure havebeen specifically described, the present disclosure is not to beconstrued as being limited thereto. Various changes or modification maybe made to the present disclosure without departing from the scope andspirit of the present disclosure.

What is claimed is:
 1. A system for transfer learning based capsuleendoscopic images classification comprising: one or more computerprocessors configured to: remove acquired capsule endoscopic images withan average brightness value beyond a preset threshold, and remove thecapsule endoscopic images without details based on image brightnessstandard deviation and image brightness gradient; remove similar imagesfrom the capsule endoscopic images using optical flow method; classifythe capsule endoscopic images according to the corresponding anatomicalstructure to obtain a list of classified capsule endoscopic imagesarranged in chronological order based on the classified capsuleendoscopic images; and determine and label the position of the firstimage of each specific anatomical structure in the classified capsuleendoscopic images list arranged in chronological order; wherein the oneor more computer processors are further configured to remove similarimages from the capsule endoscopic images using optical flow method,comprising: setting K feature points in the effective area of thecurrent capsule endoscopic image; adjusting the brightness of nextcapsule endoscopic image, and adjusting the average brightness value ofthe next capsule endoscopic image as the same as the average brightnessvalue of the current capsule endoscopic image; in the effective area ofthe said next capsule endoscope image, setting the positions of featurepoints of the current capsule endoscopic image as initial positions, andsearching for the best matching position of each feature point in thecurrent capsule endoscopic image around the initial positions usingoptical flow method; and assigning a weight to the best matchingposition of each feature point, calculating the sum of weights of thebest matching positions of all feature points as the image matchingweight W, and removing similar images using the image matching weight W;wherein when the image matching weight W is less than the image matchingweight threshold Wth, or the number of feature points P where the bestmatching positions are found is less than the threshold Pth, it isdetermined that the corresponding capsule endoscopic images are notsimilar, otherwise it is determined that the corresponding capsuleendoscopic images are similar; wherein when the standard deviation S_(i)in the neighborhood of the i-th feature point of the current capsuleendoscopic image is greater than the threshold AStd for determiningwhether there are details in the neighborhood, it is determined thatthere are details in the neighborhood of the i-th feature point, and thematching weight of the i-th feature point is u; otherwise, the matchingweight of the i-th feature point is v.
 2. The system of claim 1, whereinthe one or more computer processors are further configured to calculatesan average brightness value M in the effective area of a capsuleendoscopic image, wherein when the average brightness value M is lessthan the too dark threshold Low, the corresponding capsule endoscopicimage is determined as too dark and the image is removed; when theaverage brightness value M is greater than the too bright thresholdHigh, the corresponding capsule endoscopic image is determined as toobright and the image is removed.
 3. The system of claim 1, wherein theone or more computer processors are further configured to calculates animage brightness standard deviation S and an image brightness gradient Gin the effective area of an capsule endoscopic image, and counts thenumber of pixels B as the image brightness gradient G meetsrequirements, wherein when the image brightness standard deviation S isless than the image brightness standard deviation threshold Std or thenumber of pixels B is less than the threshold for an effective gradientGradNum, the corresponding capsule endoscopic image is determined thatit has no details and removes it.
 4. The system of claim 1, wherein theK feature points are setting uniformly in the effective area of thecurrent capsule endoscopic image.
 5. The system of claim 1, wherein theone or more computer processors are further configured to: obtain afirst image data feature from the capsule endoscopic images by using apreset image data model; obtain a second image data feature from thefirst image data feature by using a transfer learning model, and at thesame time obtain a third image data feature from the capsule endoscopicimages by the manual feature extraction; and fuse the second image datafeature and the third image data feature to obtain an imageclassification data feature; according to specific anatomicalstructures, classify the capsule endoscopic images by the imageclassification data feature.
 6. The system of claim 5, wherein the thirdimage data features comprise image color, texture, and gradientfeatures, wherein the image color features are calculated using the Humatrix of each channel of hue, saturation, value (HSV), and imagetexture features are calculated using a completed local binary pattern(CLBP) histogram.
 7. The system of claim 1, wherein the one or morecomputer processors are further configured to removes interference datafrom the classified capsule endoscopic images list arranged inchronological order by filtering, and then search for the position ofthe first image of each anatomical structure in filtered capsuleendoscopic images list.
 8. A method for transfer learning based capsuleendoscopic images classification, comprising: removing acquired capsuleendoscopic images with an average brightness value beyond the presetthreshold, and removing the capsule endoscopic images without detailsbased on image brightness standard deviation and image brightnessgradient; removing similar images from the capsule endoscopic imagesusing optical flow method; classifying the capsule endoscopic imagesaccording to the corresponding anatomical structure to obtain a list theclassified capsule endoscopic images list arranged in chronologicalorder based on the classified capsule endoscopic images; determining andlabeling the position of the first image of each specific anatomicalstructure in the classified capsule endoscopic images list arranged inchronological order.
 9. The method of claim 8, comprising removing thecapsule endoscopic images with the average brightness value beyond thepreset threshold by: calculating an average brightness value M in theeffective area of a capsule endoscopic image, wherein when the averagebrightness value M is less than the too dark threshold Low, determiningthat the corresponding capsule endoscopic image as too dark and removingthe image; when the average brightness value M is greater than the toobright threshold High, determining that the corresponding capsuleendoscopic image as too bright and removing the image.
 10. The method ofclaim 8, comprising removing the capsule endoscopic images withoutdetails by: calculating an image brightness standard deviation S and animage brightness gradient G in the effective area of an capsuleendoscopic image, and counting the number of pixels B as the imagebrightness gradient G meets requirements, wherein when the imagebrightness standard deviation S is less than the image brightnessstandard deviation threshold Std or the number of pixels B is less thanthe threshold for an effective gradient GradNum, determining that thecorresponding capsule endoscopic image has no details and removing it.11. The method of claim 8, comprising removing similar images from thecapsule endoscopic images by: setting K feature points in the effectivearea of the current capsule endoscopic image; adjusting the brightnessof next capsule endoscopic image, and adjusting the average brightnessvalue of the next capsule endoscopic image as the same as the averagebrightness value of the current capsule endoscopic image; in theeffective area of the said next capsule endoscope image, setting thepositions of feature points of the current capsule endoscopic image asinitial positions, and searching for the best matching position of eachfeature point in the current capsule endoscopic image around the initialpositions using optical flow method; and assigning a weight to the bestmatching position of each feature point, calculating the sum of weightsof the best matching positions of all feature points as the imagematching weight W, and removing similar images using the image matchingweight W.
 12. The method of claim 11, wherein the K feature points aresetting uniformly in the effective area of the current capsuleendoscopic image.
 13. The method of claim 11, wherein when the imagematching weight W is less than the image matching weight threshold Wth,or the number of feature points P where the best matching positions arefound is less than the threshold Pth, it is determined that thecorresponding capsule endoscopic images are not similar, otherwise it isdetermined that the corresponding capsule endoscopic images are similar.14. The method of claim 11, wherein when the standard deviation S_(i) inthe neighborhood of the i-th feature point of the current capsuleendoscopic image is greater than the threshold AStd for determiningwhether there are details in the neighborhood, it is determined thatthere are details in the neighborhood of the i-th feature point, and thematching weight of the i-th feature point is u; otherwise, the matchingweight of the i-th feature point is v.
 15. The method of claim 8,comprising classifying the capsule endoscopic images by: obtaining afirst image data feature from the capsule endoscopic images by using apreset image data model; obtaining a second image data feature from thefirst image data feature by using a transfer learning model, and at thesame time obtaining a third image data feature from the capsuleendoscopic images by the manual feature extraction; and fusing thesecond image data feature and the third image data feature to obtain animage classification data feature; according to specific anatomicalstructures, classifying the capsule endoscopic images by the imageclassification data feature.
 16. The method of claim 15, wherein thethird image data features comprise image color, texture, and gradientfeatures, wherein the image color features are calculated using the Humatrix of each channel of hue, saturation, value (HSV), and imagetexture features are calculated using a completed local binary pattern(CLBP) histogram.
 17. The method of claim 8, comprising determining andlabeling the position of the first image by: removing interference datafrom the classified capsule endoscopic images list arranged inchronological order by filtering, and then searching for the position ofthe first image of each anatomical structure in filtered capsuleendoscopic images list.